package com.kongbai;

import java.util.Random;

public class Test02 {
    public static void main(String[] args) {
        int[] a=new int[10];
        int e;
        System.out.println(233);
        for (int i=0;i<10;i++){
            Random random = new Random();
            int b=random.nextInt(100)+200;
            a[i]=b;
        }
        for (int x:a) {
            System.out.print(x+" ");
        }
        for (int c=0;c<a.length-1;c++){
            for (int d=0;d<a.length-1-c;d++){
              if (a[d]>a[d+1]){
                  e=a[d];
                  a[d]=a[d+1];
                  a[d+1]=e;
              }
            }
            System.out.println();
            System.out.print("第"+(c+1)+"次排序后结果：");
            for (int x:a) {
                System.out.print(x+" ");
            }
        }
    }
}
